package com.zeldu.exam.service.serviceimpl;

import com.zeldu.exam.mapper.examDao;
import com.zeldu.exam.pojo.exam;
import com.zeldu.exam.service.examService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class examServiceImpl implements examService {
    @Autowired(required = false)
    private examDao examDao;
    @Override
    public List<exam> queryAll() {
        return examDao.queryAll();
    }

    @Override
    public int insert(exam exam) {
        return examDao.insert(exam);
    }

    @Override
    public int deleteById(Long id) {
        return examDao.deleteById(id);
    }

    @Override
    public int updateById(exam exam) {
        return examDao.updateById(exam);
    }

    @Override
    public exam queryById(Long id) {
        return examDao.selectById(id);
    }

    @Override
    public List<exam> queryByTeacherId(Long id) {
        return examDao.queryByTeacherId(id);
    }
}
